//用于重写渠道的选中值
(function(YuXi){
	var wri={};
	wri.post=function(objectSouW,value){


		var fenV=$("#fenkMut option:selected").val();
			
			var span=$.trim(value);
			
			var newName="";
			var arr=[];
			arr=YuXi.recursionSource.flagsource(fenV,2,objectSouW);
			for(var yx=arr.length-1;yx>=0;yx--)
				{
				
					newName=newName+"-"+arr[yx];

				}
		
			var title=newName+"-"+span;
			title=title.substring(1,title.length);
			
			$("#select2-fenkMut-container").html(title);
			$("#select2-fenkMut-container").attr("title",title);




	}
	wri.get=function(objectSouW,flag){
		if(flag==1)
		{
			var sourceNameArray=[];
			var len=$("#souceMut option:selected").length;
			var idArr=[];
			var idName={};
			for(var fl=0;fl<len;fl++)
			{
					var id=$("#souceMut").find("option:selected").eq(fl).val();
					var arr=[];
					arr=YuXi.recursionSource.flagsource(id,1,objectSouW);
					var newName="";
					for(var yx=arr.length-1;yx>=0;yx--)
					{
				
						newName=newName+"-"+arr[yx];

					}
					var title=newName+"-"+$.trim($(".select2-selection__choice").eq(fl).attr("title"));
					title=title.substring(1,title.length);
					var html='<span class="select2-selection__choice__remove" role="presentation">×</span>'+title;
					$(".select2-selection__choice").eq(fl).html(html);
			}

			return title;



		}
		else
		{




			var fenV=$("#fenkMut option:selected").val();
	

			var span=$.trim($("#select2-fenkMut-container").text());
			
			var newName="";
			var arr=[];
			arr=YuXi.recursionSource.flagsource(fenV,2,objectSouW);
			for(var yx=arr.length-1;yx>=0;yx--)
				{
				
					newName=newName+"-"+arr[yx];

				}
			var title=newName+"-"+span;
			title=title.substring(1,title.length);
		
			$("#select2-fenkMut-container").html(title);
			$("#select2-fenkMut-container").attr("title",title);


				return title;

		}

	


















	}
	YuXi.wri=wri;
})(YuXi);